import request from '@/utils/request';
const suffix = '/api/permission/';

// 获取小组列表查询
export const getGroupList = data => request({
  url: `${suffix}getGroupList`,
  method: 'post',
  data: data
});
// 小组编辑
export const groupUpdate = data => request({
  url: `${suffix}group/update`,
  method: 'post',
  data: data
});
// 小组删除
export const groupDelete = data => request({
  url: `${suffix}group/delete`,
  method: 'post',
  data: data
});
// 小组添加
export const groupAdd = data => request({
  url: `${suffix}group/add`,
  method: 'post',
  data: data
});
// 小组人员列表分页查询
export const groupUserList = data => request({
  url: `${suffix}getGroupUserList`,
  method: 'post',
  data: data
});
// 小组添加人员
export const groupUserAdd = data => request({
  url: `${suffix}groupUser/add`,
  method: 'post',
  data: data
});
// 小组权限数据保存
export const addGroupRight = data => request({
  url: `${suffix}addGroupRight`,
  method: 'post',
  data: data
});
// 小组权限树
export const groupTree = groupId => request({
  url: `${suffix}getGroupMenuTree/${groupId}`,
  method: 'get'
});
